/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.corespring.restaurant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.corespring.restaurant.dao.RecetaDao;
import org.corespring.restaurant.model.Receta;
import org.corespring.restaurant.service.RecetaManager;

/**
 *
 * @author u201014509
 */
@Service
public class RecetaManagerImpl implements RecetaManager {

    @Autowired
    RecetaDao recetaDao;

    @Override
    public List<Receta> obtenerRecetas() {
        return recetaDao.obtenerRecetas();
    }

    @Override
    public List<Receta> obtenerPlatoReceta(String sIdplato) {
        return recetaDao.obtenerPlatoReceta(sIdplato);
    }

    @Override
    public List<Receta> obtenerListaIngredientesPorPlato(String idPlato) {
        return recetaDao.obtenerListaIngredientesPorPlato(idPlato);
    }
    @Override
    public Receta obtenerRecetaByPlatoAndIngrediente(String idPlato,String sIding){
        return recetaDao.obtenerRecetaByPlatoAndIngrediente(idPlato, sIding);
    }

    @Override
    public void guardarReceta(Receta receta) {
        recetaDao.guardarReceta(receta);
    }

    @Override
    public void EliminarReceta(String sIdplato,String sIding){
        recetaDao.EliminarReceta(sIdplato, sIding);
    }
}
